package tgc.edu.ljc.bookmanage.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import tgc.edu.ljc.bookmanage.security.SysUser;

@Entity
public class Student extends SysUser{
	private String sex;
	private String job;
	private Date born;
	@JsonIgnoreProperties(value="students")
	private TbClass tbClass;

	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getJob() {
		return job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	@CreatedDate
	@Temporal(TemporalType.DATE)
	public Date getBorn() {
		return born;
	}
	
	public void setBorn(Date born) {
		this.born = born;
	}
	
	@ManyToOne
	@CreatedBy
	public TbClass getTbClass() {
		return tbClass;
	}
	public void setTbClass(TbClass tbClass) {
		this.tbClass = tbClass;
	}
	
	
}
